package cn.iocoder.yudao.module.example.dao.controller.app;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.example.dao.service.IDAOExampleService;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@RestController
@RequestMapping("/example/dao")
@Validated
public class AppDAOExampleController {
    @Resource
    private IDAOExampleService daoExampleService;

    @GetMapping("/testQuery")
    @Operation(summary = "testQuery")
    public CommonResult<List<Map<String, Object>>> call() {
        final List<Map<String, Object>> rows = daoExampleService.testQuery();
        return success(rows);
    }

}
